home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / pkill.nr < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. Pkill(2)                   Oct. 1, 1991                  Pkill(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Pkill - send a signal to a process
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <signal.h>
  12.  
  13.        WORD Pkill( WORD pid, WORD sig);
  14.  
  15. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  16.        _✓P_✓k_✓i_✓l_✓l  sends  the  signal  described by _✓s_✓i_✓g to one or more
  17.        processes, as follows:
  18.  
  19.        If _✓p_✓i_✓d is a positive number, then the signal  is  sent  to
  20.        the process with that process id.
  21.  
  22.        If _✓p_✓i_✓d is 0, the signal is sent to all members of the pro-
  23.        cess group of the  calling  process  (i.e.  all  processes
  24.        which  have the same process group number). This includes,
  25.        of course, the calling process itself.
  26.  
  27.        If _✓p_✓i_✓d is less than 0, the signal is sent to all processes
  28.        with process group number _✓-_✓p_✓i_✓d.
  29.  
  30. R✓RE✓ET✓TU✓UR✓RN✓NS✓S
  31.        0  if  successful.  Note  that if the current process is a
  32.        recipient of the signal, the _✓P_✓k_✓i_✓l_✓l call may not return  at
  33.        all if the process is killed.
  34.  
  35.        ERANGE if _✓s_✓i_✓g is not a valid signal.
  36.  
  37.        EFILNF if _✓p_✓i_✓d
  38.         >  0 and the indicated process has terminated or does not
  39.        exist, or if _✓p_✓i_✓d
  40.         < 0 and there are no processes in the corresponding  pro-
  41.        cess group.
  42.  
  43.        EACCDN  if  _✓p_✓i_✓d  > 0, the sending process does not have an
  44.        effective user id of 0, and the recipient  process  has  a
  45.        different user id from the sending process.
  46.  
  47. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  48.        _✓P_✓s_✓e_✓t_✓p_✓g_✓r_✓p_✓(_✓2_✓)_✓, _✓P_✓s_✓i_✓g_✓n_✓a_✓l(2)
  49.  
  50. B✓BU✓UG✓GS✓S
  51.        The  user  id checks should also be performed when sending
  52.        signals to process groups. Do _✓n_✓o_✓t  rely  on  the  lack  of
  53.        checks, as this will be corrected at some point.
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Version 0.9          MiNT Programmer's Manual                   1
  65.  
  66.  
  67.